import '../css/index.css';

const button = document.createElement('button');
const oH1 = document.getElementsByClassName('title')[0];

button.innerText = '按钮';
button.className = 'btn';
document.body.appendChild(button);

const oBtn = document.getElementsByClassName('btn')[0];
oBtn.addEventListener(
  'click',
  () => {
    // console.log('this is a button');
    // console.log(oH1);
    oH1.innerText = 'hello koa!';
  },
  false
);
